/** BASE & LAYOUT **/
body {
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #f4f7fa;
}

header {
    background-color: #3498db;
    padding: 10px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header a {
    color: white;
    text-decoration: none;
}

header .user-links a {
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

header .user-links a:hover {
    background-color: #2980b9;
}

#main-container {
    display: flex;
    height: calc(100vh - 55px);
}

#main-container > nav {
    width: 220px;
    background-color: #3498db;
    padding-top: 10px;
}

#main-container > nav a {
    display: block;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}

#main-container > nav a:hover {
    background-color: #2980b9;
}

#main-container > nav a.active {
    background-color: #2980b9;
    font-weight: bold;
}

main {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/** UTILS **/
.text-right {
    text-align: right;
}
.hidden {
    display: none;
}

/** TABLES **/
table {
    width: 100%;
    border-collapse: collapse;
}

table tr.active {
    background: rgba(254, 0, 142, 0.1);
}

table tr.deleted {
    color: #888;
}

table tr:hover {
    background: #eee;
}

table th, table td {
    border-bottom: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}
.break-all {
    word-break: break-all;
}
table th {
    border-bottom: 3px solid #ddd;
}

/** FORMS **/

label {
    display: block;
    font-weight: bold;
    padding-bottom: 4px;
}

input[type=text], input[type=date], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    display: block;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
}

input[type=text]:focus, input[type=url]:focus, input[type=date]:focus, input[type=email]:focus, input[type=password]:focus, input[type=number]:focus, select:focus, textarea:focus {
    border-color: #0058de;
    outline: none;
}

.helptext {
    display: block;
    padding-top: 8px;
    color: #666;
}

button, a.btn, input[type=submit] {
    border: 2px solid #0058de;
    border-radius: 4px;
    padding: 8px 32px;
    cursor: pointer;
    color: #0058de;
    font-weight: bold;
    text-decoration: none;
}

button:hover, a.btn:hover, button:active, a.btn:active, input[type=submit]:hover, input[type=submit]:active {
    background: #0058de;
    color: white;
}

.errorlist {
    border: 4px solid #fe008e;
    border-radius: 4px;
    padding: 8px;
    color: #fe008e;
    list-style: none;
}

form ul {
    list-style: none;
    padding-left: 0;
}

/** LINKS **/
a, a:visited {
    color: #0058de;
    text-decoration: none;
}
a:hover, a:active, a:focus {
    text-decoration: underline;
}

/** MESSAGES **/
.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.messages .error, .messages .warning {
    border: 4px solid #fe008e;
    border-radius: 4px;
    padding: 8px;
    color: #fe008e;
}
.messages .success, .messages .info {
    border: 4px solid #0058de;
    border-radius: 4px;
    padding: 10px;
    color: #0058de;
}


/** OTHER STUFF **/
pre {
    background: #333;
    color: #ddd;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}
.text-muted {
    color: #888;
}

/* Sidebar overrides to keep navigation text color consistent with common dashboard */
.sidebar-nav li > a,
.sidebar-nav li > a:visited,
.sidebar-nav li > a.active,
.sidebar-nav li > a:hover,
.sidebar-nav li > a:focus,
.sidebar-nav .nav-second-level li > a {
    color: #333 !important; /* inherit standard dashboard text color */
    text-decoration: none;
}

.sidebar-nav li > a:hover,
.sidebar-nav li > a:focus {
    background-color: #f2f2f2; /* subtle hover, matching existing active bg (#eeeeee close) */
}